package cn.eonshine.cuba.inf.common.http;

import java.util.Date;

import cn.hutool.core.bean.DynaBean;

/**
 * 接口状态
 * @author lanjf2000
 *
 */
public class InfStatus {

	public static final int INF_OK =200;
	public static final int INF_ERROR =400;
	/**
	 * create_by
	 */
	public static final String CREATE_BY="1";
	/**
	 * UPDATE_by
	 */
	public static final String UPDATE_BY="1";
	/**
	 * 数据未被提取
	 */
	public static final int LSMS_UPDATE_EXTRACT_NO=1;
	/**
	 * 数据已经被LSMS提取
	 */
	public static final int LSMS_UPDATE_EXTRACT_YES=0;
	/**
	 * 接口取回的数据删除或者改变状态
	 * 0-delete 1-update
	 */
//	public static final int DMZ_DATA_STATUS=0;//DELDTE
	
	public static class TRANS_STATUS {
		public static final String SUCCESS="success";
		public static final String FAIL="fail";
	}
	

	/**
	 * Oilfield prod per day（油田每日生产量）infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_OILFIELD_PROD_PER_DAY="6";
	/**
	 * Refinery daily production（炼厂每日生产量）infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_REFINERY_DAILY_PRODUCTION="7";
	
	/**
	 * Sea tanker GPS（油轮GPS定位信息）infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_SEA_TANKER_GPS="9";
	/**
	 * Sea tanker GPS port mapping
	 */
	public static final String DMZ_MAPPING_GPS_TANKER_PORT="37";
	/**
	 * Train GPS（火车GPS定位信息）infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_TRAIN_GPS="10";
	/**
	 * company infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_ECC="12";
	/**
	 * refinery infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_REFINERY="13";
	/**
	 * Oil depot（油库基础信息） infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_OIL_DEPOT="14";
	/**
	 * Oilfield（油田基础信息） infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_OILFIELD="15";
	/**
	 * customer infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_CUSTOMER="16";
	/**
	 * Oil tanker (油罐基础信息) infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_OIL_TANKER="17";
	/**
	 * Oil（产品信息维护） infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_OIL="18";
	/**
	 * carrier infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_CARRIER="19";
	/**
	 * Pipline（管线基础信息） infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_PIPLINE="20";
	/**
	 * Pipline station（管道站房位置信息维护）infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_PIPLINE_STATION="21";
	/**
	 * Road tanker（罐车基础信息）master infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_ROAD_TANKER_MASTER="251";
	/**
	 * Road tanker（罐车基础信息）master infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_ROAD_TANKER_SUBTABLE="252";
	/**
	 * Train tanker（铁路罐车信息维护）infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_TRAIN_TANKER="26";
	/**
	 * Oil station（加油站基础信息） infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_OIL_STATION="27";
	/**
	 * Industry（行业信息维护）infmation in the mapping table
	 */
	public static final String DMZ_MAPPING_INDUSTRY="28";
	
	/**
	 * 接口日志类型
	 * @author Alan
	 *
	 */
	public static class INF_LOG_TYPE {
		public static final int DICT_DATA_TYPE_ID=80;
		public static final String DICT_DATA_TYPE_NAME="logType";
		public static final String ECC_NUM="1";
		public static final String REFINERY_NUM="2";
		public static final String DEPOSITE_NUM="3";
		public static final String EPEP_NUM="4";
		public static final String OIL_STATION_NUM="5";
		public static final String PRODUCT_NUM="6";
		public static final String OIL_TANK_NUM="7";
		public static final String INVENTORY_NUM="8";
		public static final String INDUSTRY_REAL_NUM="9";
		public static final String CUSTOMER_INVENTORY_NUM="10";
		public static final String BARCO_GPS_NUM="11";
		public static final String TREN_GPS_NUM="12";
		public static final String AUTOMOTOR_GPS_NUM="13";
	}
	
	
	public static class LSMS_OFFICE_PARENT {
		public static final String ROOT="0";
		public static final String SYS_UNION_CUPET="1";
		public static final String SYS_ENCC="2";
	}
	
	public static String SEPARATOR_CHAR=",";
	/**
	 * 
	 * @ClassName:  LSMS_OFFICE_TYPE   
	 * @Description: LSMS system office type
	 * @author: Alan
	 * @date:   2019-02-18 11:16:28
	 *     
	 */
	public static class LSMS_OFFICE_TYPE{
		/**
		 * org type  机构类型1
		 * ECC   公司
		 */
		public static final String ORG_TYPE_ECC = "1";
		/**
		 * org type  机构类型2
		 * oildepot   油库
		 */
		public static final String ORG_TYPE_OILDEPOT = "2";
		/**
		 * org type  机构类型3
		 * refinery   炼厂
		 */
		public static final String ORG_TYPE_REFINERY = "3";
		
		/**
		 * org type  机构类型4
		 * oildepot   加油站
		 */
		public static final String ORG_TYPE_GAS_STATION = "4";
		
		/**
		 * org type  机构类型5
		 * oilfield   油田
		 */
		public static final String ORG_TYPE_OILFIELD = "5";
	}
	
	
	/**
	 * 设置更新时间
	 * @param bean
	 * @return Date
	 */
	public static Date setUpdate(Object bean) {
		DynaBean beans = DynaBean.create(bean);
		Date date =beans.get("dataInputDatetime");
		return date;
	}
	/**
	 * save mapping inf status
	 */
	public static final int SAVE_STATUS_SUCESS=3;//save successfull
	public static final int SAVE_STATUS_FAIELD=1;//Sace faield
	public static final int SAVE_STATUS_EXCEPTION=2;//Sace faield
	
	
	public static final int DICT_DATA_TYPE_ID = 1;
	public static final String DICT_DATA_TYPE_NAME = "dataType";
	
	public static final String USEABLE_YES="1";
	public static final String USEABLE_NO="0";
	
	/**
	 * is history : 0 - no; 1- yes
	 */
	public static final String GPS_IS_HIS_NO="0";
	/**
	 * is history : 0 - no; 1- yes
	 */
	public static final String GPS_IS_HIS_YES="1";
	
	public static final int IS_FROM_INTERFACE=1; 
}
